package com.byl.modules.sys.controller;

import com.byl.common.modules.controller.BaseController;
import com.byl.modules.sys.service.LoggerService;
import com.byl.sdk.bean.ResultBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;
import java.util.logging.Logger;

/**
 * Created by Administrator on 2020/1/2.
 */
@RestController
public class LoggerController extends BaseController {

    @Autowired
    LoggerService loggerService;

    @RequestMapping("/web/access")
    public String queryCount(){
        int c=loggerService.queryAccessCount();
        return success("访问量",c);
    }


    @RequestMapping("/api/logger/list")
    public String query(@RequestBody Map map){
        ResultBean bean=loggerService.query(map);
        return success("日志列表",bean);
    }
}
